/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.liquidByte.trafficMustang.server.services;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Alexandre
 */
public abstract class Converter<TInput, TOutput> {
    public abstract TOutput convert(TInput input);
    
    public List<TOutput> convert(List<TInput> input) {
        List<TOutput> output = new ArrayList<TOutput>();
        for (TInput item : input) {
            output.add(this.convert(item));
        }
        return output;
    }
}
